﻿using ITPaloozaPCL.Interfaces;
using ITPaloozaPCL.PCL.Service;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ITPaloozaPlatformSpecific.Desktop
{
    public partial class StockManager
    {
        public static List<IStock> GetData()
        {
            DataService service = new DataService();
            List<IStock> returnValues = new List<IStock>();
            returnValues.AddRange(service.GetPriceList("AA", 20));
            returnValues.AddRange(service.GetPriceList("BB", 20));
            returnValues.AddRange(service.GetPriceList("CC", 20));
            returnValues.AddRange(service.GetPriceList("DD", 20));
            returnValues.AddRange(service.GetPriceList("EE", 20));

            return returnValues;
        }

        public void GetData(ref List<IStock> returnValues)
        {
            getData(ref returnValues);
        }

        /*Partial Methods are implicitly private but can be called by public wrappers.*/
        static partial void getData(ref List<IStock> returnValues)
        {
            DataService service = new DataService();
            returnValues.AddRange(service.GetPriceList("AA", 20));
            returnValues.AddRange(service.GetPriceList("BB", 20));
            returnValues.AddRange(service.GetPriceList("CC", 20));
            returnValues.AddRange(service.GetPriceList("DD", 20));
            returnValues.AddRange(service.GetPriceList("EE", 20));
        }
    }
}
